Skip to content

chore: Update external account schemas from webdev#151

Open
lightspark-copybara[bot] wants to merge 1 commit intomainfrom
auto/sync-external-accounts-20260204-213508
Open

chore: Update external account schemas from webdev#151
lightspark-copybara[bot] wants to merge 1 commit intomainfrom
auto/sync-external-accounts-20260204-213508

Conversation

@lightspark-copybara
Copy link

Auto-synced external account schemas from webdev.

These schemas are generated from VASP adapter field definitions in sparkcore.

Please review the changes before merging.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 4, 2026

Greptile Overview

Greptile Summary

Added two new external account types for cross-border payment corridors: MXN SPEI (Mexican banking) and INR UPI (Indian payments). The schemas define required fields for USD → MXN and USD → INR payment flows.

Key Issues Found:

  • Both new schemas (InrUpiAccountInfo.yaml, MxnSpeiAccountInfo.yaml) don't follow the established architectural pattern used by existing account types
  • Existing schemas use allOf composition to extend BaseExternalAccountInfo.yaml and reference shared schemas (e.g., UpiAccountExternalAccountInfo.yaml, ClabeAccountExternalAccountInfo.yaml)
  • New schemas define beneficiary inline with only fullName, while existing patterns use $ref: ./BeneficiaryOneOf.yaml supporting both individual and business beneficiaries with required fields like beneficiaryType, birthDate, and nationality
  • Title naming in ExternalAccountInfoOneOf.yaml uses schema names instead of descriptive titles like other entries
  • Missing additions to ExternalAccountType.yaml and BaseExternalAccountInfo.yaml discriminator mappings (though this may be intentional if these are corridor-specific variants)

Impact:
These inconsistencies may cause validation issues, break client expectations around beneficiary data, and create maintenance challenges due to diverging patterns.

Confidence Score: 2/5

  • This PR introduces structural inconsistencies that break established OpenAPI schema patterns and may cause validation or integration issues
  • Score reflects critical architectural deviations from existing patterns: new schemas don't use the allOf composition pattern, beneficiary definitions are incomplete compared to existing standards, and the schemas lack proper inheritance from base types. While the changes are auto-generated from webdev, they need manual correction to align with the codebase's established conventions before merging
  • Both new schema files (InrUpiAccountInfo.yaml and MxnSpeiAccountInfo.yaml) require structural refactoring to match existing patterns

Important Files Changed

Filename Overview
openapi/components/schemas/external_accounts/ExternalAccountInfoOneOf.yaml Added two new account types (MXN_SPEI_ACCOUNT and INR_UPI_ACCOUNT) to oneOf and discriminator mapping, but titles don't follow existing naming pattern
openapi/components/schemas/external_accounts/InrUpiAccountInfo.yaml New INR UPI account schema with inline beneficiary definition that doesn't match existing patterns - should use BeneficiaryOneOf reference
openapi/components/schemas/external_accounts/MxnSpeiAccountInfo.yaml New MXN SPEI account schema with inline beneficiary definition that doesn't match existing patterns - should use BeneficiaryOneOf reference

Sequence Diagram

sequenceDiagram
    participant WebDev as Webdev (VASP Adapter)
    participant CopyBot as lightspark-copybara[bot]
    participant GridAPI as Grid API (OpenAPI Spec)
    participant Consumer as API Consumers

    WebDev->>WebDev: Define MXN SPEI & INR UPI<br/>account fields in sparkcore
    WebDev->>WebDev: Generate schemas from<br/>VASP adapter definitions
    WebDev->>CopyBot: Auto-sync trigger
    CopyBot->>GridAPI: Create PR with new schemas<br/>(MxnSpeiAccountInfo, InrUpiAccountInfo)
    CopyBot->>GridAPI: Update ExternalAccountInfoOneOf<br/>with new account types
    Note over GridAPI: Review identifies schema<br/>structure inconsistencies
    GridAPI-->>Consumer: Once merged, new account<br/>types available in API
Loading

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3 files reviewed, 5 comments

Edit Code Review Agent Settings | Greptile

Comment on lines +34 to +37
- title: MxnSpeiAccountInfo
$ref: ./MxnSpeiAccountInfo.yaml
- title: InrUpiAccountInfo
$ref: ./InrUpiAccountInfo.yaml
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Title naming inconsistent with existing patterns. Other entries use descriptive titles like "US Account", "CLABE Account", "UPI Account" but these use schema names "MxnSpeiAccountInfo" and "InrUpiAccountInfo"

Suggested change
- title: MxnSpeiAccountInfo
$ref: ./MxnSpeiAccountInfo.yaml
- title: InrUpiAccountInfo
$ref: ./InrUpiAccountInfo.yaml
- title: MXN SPEI Account
$ref: ./MxnSpeiAccountInfo.yaml
- title: INR UPI Account
$ref: ./InrUpiAccountInfo.yaml

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/external_accounts/ExternalAccountInfoOneOf.yaml
Line: 34:37

Comment:
Title naming inconsistent with existing patterns. Other entries use descriptive titles like "US Account", "CLABE Account", "UPI Account" but these use schema names "MxnSpeiAccountInfo" and "InrUpiAccountInfo"

```suggestion
- title: MXN SPEI Account
  $ref: ./MxnSpeiAccountInfo.yaml
- title: INR UPI Account
  $ref: ./InrUpiAccountInfo.yaml
```

<sub>Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!</sub>

How can I resolve this? If you propose a fix, please make it concise.

Comment on lines +18 to +26
beneficiary:
type: object
required:
- fullName
properties:
fullName:
type: string
description: Individual's full name
example: John Michael Doe
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beneficiary structure doesn't match existing external account patterns. Other account types (e.g., UpiAccountExternalAccountInfo.yaml:9, ClabeAccountExternalAccountInfo.yaml:9, NgnAccountExternalAccountInfo.yaml:27) use $ref: ./BeneficiaryOneOf.yaml which supports both individual and business beneficiaries with proper validation. This inline definition only accepts fullName without beneficiaryType, birthDate, or nationality fields required by IndividualBeneficiary.yaml:4-8

Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/external_accounts/InrUpiAccountInfo.yaml
Line: 18:26

Comment:
Beneficiary structure doesn't match existing external account patterns. Other account types (e.g., `UpiAccountExternalAccountInfo.yaml:9`, `ClabeAccountExternalAccountInfo.yaml:9`, `NgnAccountExternalAccountInfo.yaml:27`) use `$ref: ./BeneficiaryOneOf.yaml` which supports both individual and business beneficiaries with proper validation. This inline definition only accepts `fullName` without `beneficiaryType`, `birthDate`, or `nationality` fields required by `IndividualBeneficiary.yaml:4-8`

How can I resolve this? If you propose a fix, please make it concise.

Comment on lines +21 to +29
beneficiary:
type: object
required:
- fullName
properties:
fullName:
type: string
description: Individual's full name
example: John Michael Doe
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beneficiary structure doesn't match existing external account patterns. Other account types (e.g., UpiAccountExternalAccountInfo.yaml:9, ClabeAccountExternalAccountInfo.yaml:9, NgnAccountExternalAccountInfo.yaml:27) use $ref: ./BeneficiaryOneOf.yaml which supports both individual and business beneficiaries with proper validation. This inline definition only accepts fullName without beneficiaryType, birthDate, or nationality fields required by IndividualBeneficiary.yaml:4-8

Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/external_accounts/MxnSpeiAccountInfo.yaml
Line: 21:29

Comment:
Beneficiary structure doesn't match existing external account patterns. Other account types (e.g., `UpiAccountExternalAccountInfo.yaml:9`, `ClabeAccountExternalAccountInfo.yaml:9`, `NgnAccountExternalAccountInfo.yaml:27`) use `$ref: ./BeneficiaryOneOf.yaml` which supports both individual and business beneficiaries with proper validation. This inline definition only accepts `fullName` without `beneficiaryType`, `birthDate`, or `nationality` fields required by `IndividualBeneficiary.yaml:4-8`

How can I resolve this? If you propose a fix, please make it concise.

Comment on lines +1 to +7
type: object
title: InrUpiAccountInfo
description: Required fields for USD -> INR corridor via Upi
required:
- accountType
- beneficiary
- vpa
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Schema structure inconsistent with existing patterns. Other external account schemas (e.g., UpiAccountExternalAccountInfo.yaml:1-9, ClabeAccountExternalAccountInfo.yaml:1-9) use allOf composition to extend BaseExternalAccountInfo.yaml and reference common account info schemas. This standalone schema doesn't inherit base properties or use the established composition pattern

Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/external_accounts/InrUpiAccountInfo.yaml
Line: 1:7

Comment:
Schema structure inconsistent with existing patterns. Other external account schemas (e.g., `UpiAccountExternalAccountInfo.yaml:1-9`, `ClabeAccountExternalAccountInfo.yaml:1-9`) use `allOf` composition to extend `BaseExternalAccountInfo.yaml` and reference common account info schemas. This standalone schema doesn't inherit base properties or use the established composition pattern

How can I resolve this? If you propose a fix, please make it concise.

Comment on lines +1 to +7
type: object
title: MxnSpeiAccountInfo
description: Required fields for USD -> MXN corridor via Spei
required:
- accountType
- beneficiary
- clabeNumber
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Schema structure inconsistent with existing patterns. Other external account schemas (e.g., UpiAccountExternalAccountInfo.yaml:1-9, ClabeAccountExternalAccountInfo.yaml:1-9) use allOf composition to extend BaseExternalAccountInfo.yaml and reference common account info schemas. This standalone schema doesn't inherit base properties or use the established composition pattern

Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/external_accounts/MxnSpeiAccountInfo.yaml
Line: 1:7

Comment:
Schema structure inconsistent with existing patterns. Other external account schemas (e.g., `UpiAccountExternalAccountInfo.yaml:1-9`, `ClabeAccountExternalAccountInfo.yaml:1-9`) use `allOf` composition to extend `BaseExternalAccountInfo.yaml` and reference common account info schemas. This standalone schema doesn't inherit base properties or use the established composition pattern

How can I resolve this? If you propose a fix, please make it concise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants